﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CILADA.TestAssemblyTwo
{
    class FindingValuesOfParameter1
    {
        public FindingValuesOfParameter1()
        {
            Console.WriteLine("set in constructor");
        }
    }

    class FindingValuesOfParameter2
    {
        public FindingValuesOfParameter2()
        {
            String var = "set in a temp variable";
            Console.WriteLine(var);
        }
    }

    class FindingValuesOfParameter3
    {
        public FindingValuesOfParameter3()
        {
            SetByParam("set from the methods params");
        }

        public void SetByParam(string value)
        {
            Console.WriteLine(value);
        }
    }

    class FindingValuesOfParameter4
    {
        public FindingValuesOfParameter4()
        {
            SetByParam(new Slug().ToString());
            SetByParam(new String('X', 5));

            SetByParam2("some value", new Slug());
        }

        public void SetByParam(string value)
        {
            Console.WriteLine(value);
        }

        public void SetByParam2(string value, Slug s)
        {
            Console.WriteLine(s.ToString());
            Console.WriteLine(value);
        }
    }

    class FindingValuesOfParameter5
    {
        string AValue { get; set; }

        public FindingValuesOfParameter5()
        {
            AValue = "This is an object instance property.";
            PrintSomething();
        }

        public void PrintSomething()
        {
            Console.WriteLine(this.AValue);
        }
    }

    class FindingValuesOfPrimitiveParamtersHardCoded
    {
        public FindingValuesOfPrimitiveParamtersHardCoded()
        {
            //Boolean, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, IntPtr, UIntPtr, Char, Double, and Single.
            boolW(true);
            byteW(new byte());
            sbyteW(new sbyte());
            Int16W(new Int16());
        }

        public void boolW(bool b)
        {
            Console.WriteLine(b);
        }

        public void byteW(byte b)
        {
            Console.WriteLine(b);
        }

        public void sbyteW(sbyte b)
        {
            Console.WriteLine(b);
        }

        public void Int16W(Int16 b)
        {
            Console.WriteLine(b);
        }

        public void UInt16W(UInt16 b)
        {
            Console.WriteLine(b);
        }

        public void Int32W(Int32 b)
        {
            Console.WriteLine(b);
        }

        public void UInt32W(UInt32 b)
        {
            Console.WriteLine(b);
        }

        public void Int64W(Int64 b)
        {
            Console.WriteLine(b);
        }

        public void UInt64W(UInt64 b)
        {
            Console.WriteLine(b);
        }


        public void IntPtrW(IntPtr b)
        {
            Console.WriteLine(b);
        }

        public void UIntPtr(UIntPtr b)
        {
            Console.WriteLine(b);
        }

        public void ushortW(ushort b)
        {
            Console.WriteLine(b);
        }

        public void uintW(uint b)
        {
            Console.WriteLine(b);
        }

        public void ulongW(ulong b)
        {
            Console.WriteLine(b);
        }

        public void charW(char b)
        {
            Console.WriteLine(b);
        }

        public void doubleW(double b)
        {
            Console.WriteLine(b);
        }

        public void SingleW(Single b)
        {
            Console.WriteLine(b);
        }
    }
}
